<template>
<div class="bh-progress" :class="[typeClass]">
	<div class="bh-progress-bar">
		<div class="bh-progress-bar__outer">
			<div class="bh-progress-bar__inner" :style="{width: percentage + '%'}">
				<div class="bh-progress-bar__innerText">{{percentage}}%</div>
			</div>
		</div>
	</div>
</div>
</template>

<script>
export default {
	name: 'bh-progress',
	props: {
		percentage: {
			type: Number,
			default: 0,
		},
		status: {
			type: String,
			default: '',
		},
	},
	data() {
		return {
			visible: true,
		}
	},
	methods: {
		close() {
			this.visible = false;
			this.$emit('close');
		},
	},
	computed: {
		typeClass() {
			if(this.status) {
				return `is-${ this.status }`;
			}
			return '';
		},
	},
}
</script>
